package com.analysis.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 腾讯云智能体开发平台配置类
 * 基于腾讯云文档：https://cloud.tencent.com/document/product/1759/105561
 */
@Configuration
@ConfigurationProperties(prefix = "tencent.chat")
public class TencentChatConfig {
    
    /**
     * 腾讯云智能体开发平台API地址
     */
    private String apiUrl = "https://wss.lke.cloud.tencent.com/v1/qbot/chat/sse";
    
    /**
     * 应用密钥（Bot App Key）
     */
    private String botAppKey;
    
    /**
     * 应用ID
     */
    private String appId;
    
    /**
     * 默认访客ID
     */
    private String defaultVisitorBizId = "default_visitor";
    
    /**
     * 默认流式回复频率控制
     * 该值表示应用每积攒多少字符向调用方回包一次
     * 值越小回包越频繁（体验上越流畅，但流量开销也越大）
     */
    private Integer defaultStreamingThrottle = 100;
    
    /**
     * 是否默认启用思考过程展示
     */
    private Boolean defaultEnableThought = false;
    
    /**
     * 是否默认启用参考来源展示
     */
    private Boolean defaultEnableReference = true;
    
    /**
     * 是否默认启用token统计
     */
    private Boolean defaultEnableTokenStatistics = false;
    
    /**
     * 默认联网搜索控制
     * 空字符串：跟随应用配置
     * enable：打开联网搜索
     * disable：关闭联网搜索
     */
    private String defaultSearchNetwork = "enable";
    
    /**
     * 默认流式传输控制
     * 空字符串：跟随应用配置
     * enable：开启流式传输
     * disable：关闭流式传输
     */
    private String defaultStream = "disable";
    
    /**
     * 连接超时时间（毫秒）
     */
    private Integer connectTimeout = 30000;
    
    /**
     * 读取超时时间（毫秒）
     */
    private Integer readTimeout = 300000;
    
    /**
     * 是否启用日志记录
     */
    private Boolean enableLogging = true;
    
    // 构造函数
    public TencentChatConfig() {}
    
    // Getters and Setters
    public String getApiUrl() {
        return apiUrl;
    }
    
    public void setApiUrl(String apiUrl) {
        this.apiUrl = apiUrl;
    }
    
    public String getBotAppKey() {
        return botAppKey;
    }
    
    public void setBotAppKey(String botAppKey) {
        this.botAppKey = botAppKey;
    }
    
    public String getAppId() {
        return appId;
    }
    
    public void setAppId(String appId) {
        this.appId = appId;
    }
    
    public String getDefaultVisitorBizId() {
        return defaultVisitorBizId;
    }
    
    public void setDefaultVisitorBizId(String defaultVisitorBizId) {
        this.defaultVisitorBizId = defaultVisitorBizId;
    }
    
    public Integer getDefaultStreamingThrottle() {
        return defaultStreamingThrottle;
    }
    
    public void setDefaultStreamingThrottle(Integer defaultStreamingThrottle) {
        this.defaultStreamingThrottle = defaultStreamingThrottle;
    }
    
    public Boolean getDefaultEnableThought() {
        return defaultEnableThought;
    }
    
    public void setDefaultEnableThought(Boolean defaultEnableThought) {
        this.defaultEnableThought = defaultEnableThought;
    }
    
    public Boolean getDefaultEnableReference() {
        return defaultEnableReference;
    }
    
    public void setDefaultEnableReference(Boolean defaultEnableReference) {
        this.defaultEnableReference = defaultEnableReference;
    }
    
    public Boolean getDefaultEnableTokenStatistics() {
        return defaultEnableTokenStatistics;
    }
    
    public void setDefaultEnableTokenStatistics(Boolean defaultEnableTokenStatistics) {
        this.defaultEnableTokenStatistics = defaultEnableTokenStatistics;
    }
    
    public Integer getConnectTimeout() {
        return connectTimeout;
    }
    
    public void setConnectTimeout(Integer connectTimeout) {
        this.connectTimeout = connectTimeout;
    }
    
    public Integer getReadTimeout() {
        return readTimeout;
    }
    
    public void setReadTimeout(Integer readTimeout) {
        this.readTimeout = readTimeout;
    }
    
    public Boolean getEnableLogging() {
        return enableLogging;
    }
    
    public void setEnableLogging(Boolean enableLogging) {
        this.enableLogging = enableLogging;
    }
    
    public String getDefaultSearchNetwork() {
        return defaultSearchNetwork;
    }
    
    public void setDefaultSearchNetwork(String defaultSearchNetwork) {
        this.defaultSearchNetwork = defaultSearchNetwork;
    }
    
    public String getDefaultStream() {
        return defaultStream;
    }
    
    public void setDefaultStream(String defaultStream) {
        this.defaultStream = defaultStream;
    }
}
